from api.base_api import BaseReviewerApi


class ReviewerLoadProductsApi(BaseReviewerApi):

    def __init__(self, id, daikuanGoumaiYesnoTypes, licaicanpinGoumaiYesnoText):
        super().__init__()
        self.url = f'{self.host}/kejiyinhangyewuguanli/daikuanGoumai/shenhe'
        self.method = 'post'
        self.json = {"id": id,
                     "daikuanGoumaiYesnoTypes": daikuanGoumaiYesnoTypes,
                     "daikuanGoumaiYesnoText": licaicanpinGoumaiYesnoText, }


class ListReviewerLoadProductsApi(BaseReviewerApi):
    def __init__(self):
        super().__init__()
        self.url = f'{self.host}/kejiyinhangyewuguanli/daikuanGoumai/page?'
        self.method = 'get'
        self.params = {
            "page": 1,
            "limit": 10,
            "licaicanpinGoumaiDelete": 1
        }
